package Day10;

import java.util.*;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    private static boolean check(int x, int y, int i, int j) {
        if (((x - i) * (x - i) + (y - j) * (y - j)) == 5 || (x == i && j == y)) {
            return true;
        }
        return false;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        int x = in.nextInt();
        int y = in.nextInt();

        int[][] dp = new int[n+1][m+1];

        int flag = 1;
        for(int i = 0; i < n + 1; i++){
            if(check(x, y, i, 0)){
                dp[i][0] = 0;
                flag = 0;
            }else{
                if(flag == 1){
                    dp[i][0] = 1;
                }else{
                    dp[i][0] = 0;
                }
            }
        }

        flag = 1;
        for(int j = 0; j < m + 1; j++){
            if(check(x, y, 0, j)){
                dp[0][j] = 0;
                flag = 0;
            }else{
                if(flag == 1){
                    dp[0][j] = 1;
                }else{
                    dp[0][j] = 0;
                }
            }
        }

        for(int i = 1; i < n + 1; i++){
            for(int j = 1; j < m + 1; j++){
                if(check(x, y, i , j)){
                    dp[i][j] = 0;
                }else{
                    dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
                }
            }
        }

//        for(int[] e : dp){
//            for(int k : e){
//                System.out.print(k + " ");
//            }
//            System.out.println();
//        }
        System.out.print(dp[n][m]);
    }


    //最长回文字串
    //dp、双指针
    public static void main1(String[] args) {

    }

    //买卖股票的最佳时机
    //dp、贪心
    public static void main2(String[] args) {

    }
}
